package org.wdcode.back.filter;

import java.io.IOException;

import javax.servlet.FilterChain;
import javax.servlet.ServletException;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;

import org.tuckey.web.filters.urlrewrite.UrlRewriteFilter;
import org.wdcode.back.params.WdBackParams;

/**
 * 重写UrlRewrite 的UrlRewriteFilter类
 * @author WD
 * @since JDK6
 * @version 1.0 2009-12-09
 */
public class BackUrlRewriteFilter extends UrlRewriteFilter {
	/**
	 * 重写过滤方法
	 */
	@Override
	public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException {
		// 把主题路径放到Request里
		request.setAttribute("themeBack", WdBackParams.getThemeBack());
		// 调用父方法
		super.doFilter(request, response, chain);
	}
}
